﻿

CREATE TABLE [dbo].[User]
(
	[UserID] INT NOT NULL IDENTITY(1,1) PRIMARY KEY
	,LoginName VARCHAR(255) NOT NULL 
	,FirstName VARCHAR(255) NOT NULL
	,LastName VARCHAR(255)  NOT NULL
	,EmailAdress VARCHAR(255) NOT NULL
	,PhoneNumber VARCHAR(255) NOT NULL
	,[Password] VARCHAR(255) NOT NULL
	,ModifiedDate DATETIME
	,IsActive BIT
)

ALTER TABLE [dbo].[User]
	ADD CONSTRAINT UQ_LoginName_User UNIQUE(LoginName)


ALTER TABLE [dbo].[User]
	ADD CONSTRAINT DF_ModifiedDate_User DEFAULT GETDATE() FOR ModifiedDate

ALTER TABLE [dbo].[User]
	ADD CONSTRAINT DF_IsActive_User DEFAULT 1 FOR IsActive